Methods for intra prediction, encoder and decoder

ABSTRACT

A method for intra prediction includes: obtaining multiple previously reconstructed neighbouring blocks corresponding to a current processing block; determining prediction modes, that are signalled in a bitstream, corresponding to neighbouring blocks of the multiple previously reconstructed neighbouring blocks, to obtain multiple first prediction modes; if the multiple first prediction modes comprise at least two directional modes, taking directional modes comprised in the multiple first prediction modes as first prediction directions; performing, according to a preset operation rule, operation on multiple first prediction directions of the first prediction directions to obtain second prediction directions; obtaining a prediction mode set according to the second prediction directions and the multiple first prediction modes; and performing intra prediction on the current processing block based on the prediction mode set.

CROSS-REFERENCE TO RELATED APPLICATIONS

The application is a continuation of U.S. patent application Ser. No.17/366,333 filed Jul. 2, 2021, which is a continuation application ofPCT Application No. PCT/CN2019/070156 filed on Jan. 2, 2019, thedisclosure of which is hereby incorporated by reference in its entity.

BACKGROUND

In Versatile Video Coding (VVC), when intra prediction is performed on acurrent processing block, an optimal prediction mode (i.e., a signalledprediction mode) of a prediction block (also referred to as a previouslyreconstructed block) that is spatially corresponding or neighbouring tothe current processing block and on which intra prediction has beenperformed, a derived mode having an optimal direction of the previouslyreconstructed block and some fixed intra prediction modes are generallycombined as a candidate prediction mode set of the current processingblock, and intra prediction is performed on the current processing blockbased on multiple candidate prediction modes in the set. For lumablocks, if multiple candidate prediction modes in the set are selectedto perform intra prediction on a current processing block, a smallernumber of bits are used for representing the intra prediction mode ofthe current processing mode compared with a case where prediction modesoutside the set are selected for intra prediction. For chroma blocks,only the candidate modes in the set can be used for performing intraprediction on a current processing block.

Currently, before intra prediction is performed on the currentprocessing block, if a directional mode is included in the candidateprediction mode set, in order to obtain a more accurate intra predictioneffect, a new candidate prediction direction is derived on the basis ofa known candidate prediction direction by simply incrementing ordecrementing an index number of the candidate prediction direction by 1,so that the new candidate prediction direction is used for subsequentintra prediction on the current processing block.

However, such a method for implementing construction of an intraprediction direction (i.e., construction of a new candidate predictiondirection) by simply incrementing or decrementing the index number ofthe known candidate prediction direction by 1 still does not havesufficient accurate prediction effect in the process of performing theintra prediction.

SUMMARY

Embodiments of the present disclosure relate to the field of videocoding techniques, and more particularly to, but are not limited to,methods for intra prediction, an encoder and a decoder.

The technical solutions of the embodiments of the present disclosure areimplemented as follows.

A first aspect provides a method for intra prediction, applied to anencoder, the method including: obtaining multiple previouslyreconstructed neighbouring blocks corresponding to a current processingblock; determining prediction modes, that are signalled in a bitstream,corresponding to neighbouring blocks of the multiple previouslyreconstructed neighbouring blocks, to obtain multiple first predictionmodes; if the multiple first prediction modes comprise at least twodirectional modes, taking directional modes comprised in the multiplefirst prediction modes as first prediction directions; performing,according to a preset operation rule, operation on multiple firstprediction directions of the first prediction directions to obtainsecond prediction directions; obtaining a prediction mode set accordingto the second prediction directions and the multiple first predictionmodes; and performing intra prediction on the current processing blockbased on the prediction mode set.

A second aspect provides a method for intra prediction, applied to adecoder, the method including: obtaining multiple previouslyreconstructed neighbouring blocks corresponding to a current processingblock; obtaining multiple first prediction modes according to predictionmodes of neighbouring blocks of the multiple previously reconstructedneighbouring blocks; if the multiple first prediction modes comprise atleast two directional modes, taking directional modes comprised in themultiple first prediction modes as first prediction directions;performing, according to a preset operation rule, operation on multiplefirst prediction directions of the first prediction directions to obtainsecond prediction directions; obtaining a prediction mode set accordingto the second prediction directions and the multiple first predictionmodes; and performing intra prediction on the current processing blockbased on the prediction mode set.

A third aspect provides an comprising a memory and a processor, thememory storing instructions executable on the processor, where theprocessor, when executing the instructions, perform operations of:obtaining multiple previously reconstructed neighbouring blockscorresponding to a current processing block; determining predictionmodes, that are signalled in a bitstream, corresponding to neighbouringblocks of the multiple previously reconstructed neighbouring blocks, toobtain multiple first prediction modes; if the multiple first predictionmodes comprise at least two directional modes, taking directional modescomprised in the multiple first prediction modes as first predictiondirections; performing, according to a preset operation rule, operationon multiple first prediction directions of the first predictiondirections to obtain second prediction directions; obtaining aprediction mode set according to the second prediction directions andthe multiple first prediction modes; and performing intra prediction onthe current processing block based on the prediction mode set.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1A is a schematic diagram of an intra prediction principleaccording to an embodiment of the present disclosure.

FIG. 1B is a schematic diagram of 67 intra prediction directionssupported by Versatile Video Coding (VVC) in an embodiment of thepresent disclosure.

FIG. 1C is a schematic diagram of a prediction process of an intraprediction direction with an index number 66 according to an embodimentof the present disclosure.

FIG. 2A is a schematic structural diagram of a video coding systemaccording to an embodiment of the present disclosure.

FIG. 2B is a schematic structural diagram of a video decoding systemaccording to an embodiment of the present disclosure.

FIG. 3A is a schematic implementation flowchart of a method for intraprediction according to an embodiment of the present disclosure.

FIG. 3B is a schematic diagram illustrating neighbouring intraprediction modes according to an embodiment of the present disclosure.

FIG. 3C is a schematic structural diagram of a prediction directionaccording to an embodiment of the present invention.

FIG. 4 is a schematic diagram of a vector operation according to anembodiment of the present disclosure.

FIG. 5A is a schematic diagram of an arrangement of picture blocksaccording to an embodiment of the present disclosure.

FIG. 5B is a schematic diagram of determining a distance according to anembodiment of the present disclosure.

FIG. 6 is another schematic diagram illustrating neighbouring intrapredication modes according to an embodiment of the present disclosure.

FIG. 7 is a schematic diagram of arrangement of luma blocks and chromacorresponding to a current processing block according to an embodimentof the present disclosure.

FIG. 8 is a schematic diagram of an arrangement of chroma blocksaccording to an embodiment of the present disclosure.

FIG. 9 is a schematic diagram illustrating a traversal sequence of intraprediction directions of MDMS according to an embodiment of the presentdisclosure.

FIG. 10 is a schematic diagram of another vector operation according toan embodiment of the present disclosure.

FIG. 11A is a schematic structural diagram of a device for intraprediction according to an embodiment of the present disclosure.

FIG. 11B is a schematic structural diagram of another device for intraprediction according to an embodiment of the present disclosure.

FIG. 12 is a schematic diagram of a hardware entity of a video codingapparatus according to an embodiment of the present disclosure.

DETAILED DESCRIPTION

To facilitate understanding of the technical solutions of theembodiments of the present disclosure, four basic concepts of predictioncoding, intra prediction, prediction direction, and luma intraprediction are first briefly described.

The main function of the prediction coding is to construct a predictionvalue of a current processing block by using a spatially or temporallyexisting reconstructed picture in the video coding, and to transmit onlya difference between the original value and the prediction value, so asto reduce the amount of transmitted data.

The main function of the intra prediction is to construct a predictionvalue of a current processing block by using samples of a previous rowand a left column neighbouring to the current processing block. As shownin FIG. 1A, each sample of the current processing block 101 is predictedusing neighboring pixels (i.e., samples in the previous row 102 and theleft column 103 neighbouring to the current processing block) that havebeen restored and that are around the current procession block 101.

For example, the current processing block is a luma block, and when aprediction value of the current luma block is constructed by using theneighboring pixels, a plurality of prediction directions are used tosequentially predict the current luma block to obtain a luma predictionvalue matrix corresponding to each prediction direction; based on eachlama prediction value matrix and an original value matrix of the currentluma block, a difference matrix corresponding to each predictiondirection is determined; based on each difference matrix, an evaluationparameter value corresponding to the prediction direction is determined,where the evaluation parameter value is used to represent a predictioneffect of the corresponding prediction direction for the current lumablock; based on each evaluation parameter value, a target predictiondirection is determined from the plurality of prediction directions, forexample, a prediction direction in which a minimum number of pictureencoding bits can be obtained on the premise of ensuring video recoveryquality is determined as the target prediction direction; and then thetarget prediction direction is signalled. It should be noted that thereare 67 intra prediction directions supported by VVC, and the intraprediction directions with the index numbers 2-66 are shown in FIG. 1B.

Taking the intra prediction direction with the index number 66 as anexample, as shown in FIG. 1C, a method of constructing a luma predictionvalue of each sample of the current luma block 101 is given. Data aprevious row 102 neighbouring to the current luma block 101 arepreviously reconstructed blocks. Each sample of the current luma block101 is filled with a value of the sample along the upper right diagonal(i.e., the prediction direction with the index number 66).

In addition to the above-described manner for construction of aprediction block corresponding to FIG. 1C, there are two relatively flatmanners for construction of a prediction block, namely, the directcurrent (DC) mode and the planar mode. In the DC mode, the entirecurrent processing block is filled with an average of characteristicvalues (e.g., chroma values or luma values) of the previous row or theleft column, and in the planar mode, the current processing block isfilled in a gradual manner.

For the luma mode, prediction is performed sequentially according tovarious modes in FIG. 1B, a prediction mode that best matches thecurrent luma block (for example, a sum of differences of differencematrices is minimum, or the rate distortion cost is minimum) is selectedas the target prediction mode, the luma prediction value of each sampleof the current luma block is constructed, and a difference value betweenthe luma prediction value of each sample and the corresponding lumaoriginal value is determined. After the difference value correspondingto each sample corresponding to the target prediction mode and thetarget prediction mode are obtained, an encoding end signals thedifference value corresponding to each sample and an index number of thetarget prediction direction corresponding to the current processingblock into the bitstream. After receiving the bitstream, the decodingend parses the received bitstream to obtain the index number of thetarget prediction direction, and then calculates the luma predictionvalue of each sample in the corresponding current processing block, andadds the luma prediction value to the difference value obtained byparsing the bitstream to obtain a luma reconstruction value of thecorresponding sample.

On the basis of the above several basic concepts, an embodiment of thepresent disclosure provides a video encoding system. FIG. 2A is aschematic structural diagram of a composition of a video encoding systemaccording to an embodiment of the present disclosure. As shown in FIG.2A, the video encoding system 21 includes:

a transform and quantization unit 211, an intra prediction unit 212, anintra prediction unit 213, a motion compensation unit 214, a motionestimation unit 215, an inverse transform and inverse quantization unit216, a filter control analysis unit 217, a filtering unit 218, anentropy coding unit 219, and a decoded picture buffer unit 210. A videoreconstruction block can be obtained by dividing an input original videosignal into Coding Tree Units (CTUs); and then the residual pixelinformation obtained after intra or inter prediction is transformed bythe transform and quantization unit 211, including transforming theresidual information from a pixel domain to a transform domain andquantizing a resulting transform coefficient to further reduce the bitrate. The intra estimation unit 212 and the intra prediction unit 213are configured to perform intra prediction on the video reconstructionblock, where the intra estimation unit 212 and the intra prediction unit213 are configured to determine an optimal intra prediction mode (i.e.,the target prediction mode) of the video reconstruction block. Themotion compensation unit 214 and the motion estimation unit 215 areconfigured to perform inter prediction coding of the received videoreconstruction block with respect to one or more blocks of one or morereference pictures to provide temporal prediction information. Themotion estimation performed by the motion estimation unit 215 is aprocess of generating a motion vector that can be used to estimate themotion of the video reconstruction block, and then motion compensationis performed by the motion compensation unit 214 based on the motionvector determined by the motion estimation unit 215. After the intraprediction mode is determined, the intra prediction unit 213 is furtherconfigured to provide the selected intra prediction data to the codingunit 219, and the motion estimation unit 215 also transmits the motionvector data determined by calculating to the coding unit 219. Inaddition, the inverse transform and inverse quantization unit 216 isconfigured to reconstruct the video reconstruction block so as toreconstruct a residual block in the pixel domain; the blocking effectartifact is removed from the residual block by the filter controlanalysis unit 217 and the filtering unit 218, and then the reconstructedresidual block is added into a prediction block in the picture of thedecoded picture buffer unit 210 to generate the video reconstructionblocks that have been reconstructed. The coding unit 219 is configuredto encode various encoding parameters and quantized transformcoefficients, in the coding algorithm based on Context-based AdaptiveBinary Arithmetic Coding (CABAC), the context content may be based onneighbouring reconstruction blocks, the coding unit may configured toencode information indicating the determined intra prediction directionand output a bitstream of the video signal. The decoded picture bufferunit 210 is configured to store the video reconstruction blocks thathave been reconstructed, for prediction reference. As the video picturecoding proceeds, new reconstructed video reconstruction blocks arecontinuously generated, and these reconstructed video reconstructionblocks are stored in the decoded picture buffer unit 210.

An embodiment of the present disclosure provides a video decodingsystem. FIG. 2B is a schematic structural diagram of a video decodingsystem according to an embodiment of the present disclosure. As shown inFIG. 2B, the video coding system 22 includes:

-   -   a parsing unit 221, an inverse transform and inverse        quantization unit 222, an intra prediction unit 223, a motion        compensation unit 224, a filtering unit 225, and a decoded        picture buffer unit 226. After the input video signal is encoded        by the video encoding system 21, a bitstream of the video signal        is output; then the bitstream is input to the video decoding        system 22 and first passed through the parsing unit 221 for        obtaining the decoded transform coefficients. The transform        coefficients are processed by the inverse transform and inverse        quantization unit 222 to generate residual block in the pixel        domain; the intra prediction unit 223 is configured to generate        prediction data of a current video coding block based on the        determined intra prediction direction and data from a previously        decoded block of a current picture. The motion compensation unit        224 determines prediction information for the video coding block        by parsing the motion vector and other associated syntax        elements, and uses the prediction information to generate a        prediction block of the video decoding block that is being        decoded; a residual block from the inverse transform and inverse        quantization unit 222 and the prediction block generated from        the intra prediction unit 223 or the motion compensation unit        224 are summed to form a decoded video block; the decoded video        signal is processed by the filtering unit 225 to remove the        blocking effect artifact, and video quality can be improved;        then the decoded video blocks stored in the decoded picture        buffer unit 226, which stores a reference picture for subsequent        intra prediction or motion compensation, while also being used        for output the video signal to obtain the recovered original        video signal.

The embodiments of the present disclosure are mainly applied to theintra prediction unit 213 of the video encoding system 21 and the intraprediction unit 223 of the video decoding system 22. In other words, ifa good prediction effect can be obtained by the method for intraprediction provided in the embodiments of the present disclosure in thevideo encoding system 21, accordingly, the recovery quality of videodecoding can also be improved at the decoding end.

Based on the above, the technical solution in embodiments of the presentdisclosure will be described below in conjunction with reference thedrawings in the embodiments. It should be noted that the terms “first”,“second”, “third”, etc. mentioned throughout the description are onlyfor distinguishing different features, and do not have functions such aslimiting priority, order, size relationship, etc.

An embodiment of the present disclosure provides a method for intraprediction, which is applied to a video coding apparatus. The functionsimplemented by the method can be implemented by the processor in thevideo coding apparatus calling the program codes. Of course, the programcodes may be stored in a computer storage medium. It can be seen thatthe video coding apparatus includes at least a processor and a storagemedium.

FIG. 3A is a schematic implementation flowchart of a method for intraprediction according to an embodiment of the present disclosure. Asshown in FIG. 3A, the method includes the following operations S301 toS306.

In operation S301, a previously reconstructed block set corresponding toa current processing block is obtained.

Generally, a previously reconstructed block in the previouslyreconstructed block set is an area where intra prediction has beencompleted within a preset range of the current processing block. hereinthe previously reconstructed block refers to an area where the intraprediction has been completed, and the current processing block refersto an area where intra prediction is currently required. For example, asshown in FIG. 3B, the previously reconstructed blocks are determinedfrom all neighboring blocks above the current processing block and allneighboring blocks on the left side of the current processing block,e.g., the neighboring blocks of the current processing block, i.e., leftblock (L), above block (A), below left block (BL), above right block(AR) and above left block (AL), are taken as the previouslyreconstructed blocks in the previously reconstructed block set.

In operation S302, a first prediction mode, that is signalled in abitstream, corresponding to each previously reconstructed block in thepreviously reconstructed block set is determined, to obtain a firstprediction mode set.

It should be noted herein that the first prediction mode set is thecandidate prediction mode set described in the background section above.Generally, the first prediction mode set includes the DC mode, theplanar mode, and directional mode(s).

In operation S303, if the first prediction mode set includes at leasttwo directional modes, each of the directional modes is added into thefirst prediction direction set as a first prediction direction.

It should be noted that the first prediction direction is in fact anoptimal prediction direction determined in the intra prediction based onthe previously reconstructed block.

In other embodiments, the first prediction direction includes at leastone of a luma intra prediction direction and a chroma intra predictiondirection. It will be appreciated that, for luma blocks, if multiplecandidate prediction modes in the first prediction mode set are selectedto perform intra prediction on a current processing block, a smallernumber of bits are used for representing the intra prediction mode ofthe current processing mode compared with a case where prediction modesoutside the first prediction mode set are selected for intra prediction.When the first prediction direction is a luma intra predictiondirection, a prediction value of a previously reconstructed block is aluma value, and for operation 306, when intra prediction is performed ona prediction direction of the current processing block, intra predictionis actually performed on the luma value of the current processing block;similarly, when the first prediction direction is a chroma intraprediction direction, the prediction value of the previouslyreconstructed block is a chroma value, and for operation S306, whenintra prediction is performed on the prediction direction of the currentprocessing block, intra prediction is actually performed on the chromavalue of the current processing block.

In operation S304, vector operation is performed, according to a presetvector operation rule, on any two or more first prediction directions inthe first prediction direction set to obtain a second predictiondirection set.

It should be noted that each second prediction direction in the secondprediction direction set is actually a candidate prediction directionwhen intra prediction is performed on the prediction direction of thecurrent processing block. Generally, each first prediction direction inthe first prediction direction set is also a candidate predictiondirection used when intra prediction is performed on the predictiondirection of the current processing block.

In order to avoid obtained multiple second prediction directions fromhaving a same direction, generally, the vector operation is performed onany two or more first prediction directions having different directionsin the first prediction direction set to obtain the second predictiondirection set.

It can be understood that in practical applications, if the candidateprediction direction of the current processing block is constructed bysimply incrementing or decrementing the index number of the firstprediction direction by 1, it is not possible to obtain a sufficientprediction effect when intra prediction is performed, because obtainingthe candidate prediction direction by this construction method does notsufficiently take into account the characteristics of the local contentof the current processing block, and the direction information at theperiphery of the current processing block is not sufficiently utilized.Therefore, in the embodiment of the present disclosure, a vectoroperation is performed, according to a preset vector operation rule, onany two or more first prediction directions in the first predictiondirection set to obtain a second prediction direction set, that is, anew candidate prediction direction set, so that the possibility ofobtaining a sufficiently accurate prediction effect is increased whenintra prediction is performed on the prediction direction of the currentprocessing block.

For example, as shown in FIG. 3C, it is assumed that the previouslyreconstructed block 308 of the current processing block 307 has verticalstripe information (e.g., an AB line segment), the optimal predictiondirection corresponding to the previously reconstructed block 308 is BA;the previously reconstructed block 309 of the current processing block307 has horizontal stripe in enation (e.g., a CD line segment), theoptimal prediction direction corresponding to the previouslyreconstructed block 309 is DC; and the picture information included inthe current processing block 307 is an arc BD. At this time, when a newcandidate prediction direction is constructed based on the knowndirections BA and DC, if only the index numbers corresponding to thedirections BA and DC respectively are incremented by 1 to obtainneighbouring directions B′A′ and D′C, then when intra prediction isperformed based on the directions BA, B′A′, DC and D′C′, the obtainedprediction result is that the picture information included in thecurrent processing block 307 is a line segment D′O and line segment OB′,which is quite different from the real situation (that is, the pictureinformation included in the current processing block 307 is the arc BD).Therefore, in order to increase the possibility of obtaining asufficiently accurate prediction effect, it is possible to performvector subtraction on the directions BA and DC to obtain a direction BD,and the direction BD is also used as the candidate prediction direction(i.e., the second prediction direction).

In operation S305, the second prediction direction set is combined thefirst prediction mode set to obtain a second prediction mode set.

In operation S306, intra prediction is performed on the currentprocessing block based on the second prediction mode set.

In practical applications, the second prediction direction set includesnot only the direction information of the second prediction direction,but also the corresponding index information.

In an embodiment of the present disclosure, a method for intraprediction is provided, a previously reconstructed block setcorresponding to a current processing block is obtained; a firstprediction direction, that is signalled in a bitstream, corresponding toeach previously reconstructed block in the previously reconstructedblock set is determined (i.e., a known candidate prediction direction ofthe current processing block), to obtain a first prediction mode set; ifthe first prediction mode set includes at least two directional modes,each of the directional modes is added into the first predictiondirection set as a first prediction direction; vector operation isperformed, according to a preset vector operation rule, on any two ormore first prediction directions in the first prediction direction setto obtain a second prediction direction set (it can be understood thatthe second prediction direction in the second prediction direction setis a new candidate prediction direction of the current processingblock); and the second prediction direction set is combined with thefirst prediction mode set to obtain a second prediction mode set, intraprediction is performed on the current processing block based on thesecond prediction mode set.

In this way, a new candidate prediction direction is constructed byperforming a vector operation on two or more known candidate predictiondirections, that is, the second prediction direction set is combinedwith the first prediction mode set to obtain the second prediction modeset, and intra prediction is performed on the current processing blockbased on the second prediction mode set, so that the possibility ofobtaining a sufficiently accurate prediction effect can be increased.

An embodiment of the present disclosure provides another method forintra prediction including operations S401 to S407.

In operation S401, a previously reconstructed block set corresponding toa current processing block is obtained.

In operation S402, a first prediction mode, that is signalled in abitstream, corresponding to each previously reconstructed block in thepreviously reconstructed block set is determined, to obtain a firstprediction mode set.

In operation S403, if the first prediction mode set includes at leasttwo directional modes, each of the directional modes is added into thefirst prediction direction set as a first prediction direction.

In operation S404, vector operation is performed, according to a presetvector operation rule, on any two or more first prediction directions inthe first prediction direction set to obtain a second predictiondirection set.

In operation S405, the second prediction direction set is combined withthe first prediction mode set to obtain a second prediction mode set.

In operation S406, intra prediction is performed on the currentprocessing block based on the second prediction mode set, to obtain atarget prediction direction and a difference between a prediction valueof each sample in the current processing block corresponding to thetarget prediction direction and an original value of the sample.

Herein, it should be noted that operation S406 is actually animplementation example of operation S306 of the above-describedembodiment.

Generally, the target prediction direction is the optimal predictiondirection of the current processing block, that is, a smallrate-distortion cost can be obtained by the target prediction direction,or the difference between the prediction value of each sample of thecurrent processing block and the original value of the sample can beminimized, thereby the video compression ratio can be improved and thenumber of bits of video coding can be saved.

In operation S407, the target prediction direction and each differenceare signalled in a bitstream of the current processing block.

In other embodiments, when the target prediction direction is signalledin the bitstream of the current processing block, an index number of thetarget prediction direction may be signalled in the bitstream of thecurrent processing block. For the luma mode, if the target predictiondirection is obtained by performing a vector operation on two firstprediction directions, after the target prediction direction isdetermined, a prediction direction having an angle with the targetprediction direction smaller than a preset threshold value can bedetermined from the 67 intra prediction directions supported by the VVCshown in FIG. 1B, an index number of the prediction direction having theangle smaller than the preset threshold value is signalled in thebitstream of the current processing block as the index number of thetarget prediction direction.

For example, if the target prediction direction F_(d3) is obtained by adirect vector addition of the prediction direction F_(d1) and theprediction direction F_(d2), that is, {right arrow over (F)}_(d3)={rightarrow over (F)}_(d1)+{right arrow over (F)}_(d2), where d₁, d₂ and d₃are index numbers corresponding to the prediction directions, the indexnumber d₃ of the target prediction direction F_(d3) may be signalled(d₃=(d₁+d₂)/2).

An embodiment of the present disclosure provides yet another method forintra prediction including operations S501 to S508.

In operation S501, a previously reconstructed block set corresponding toa current processing: block is obtained.

In operation S502, a first prediction mode, that is signalled in abitstream, corresponding to each previously reconstructed block in thepreviously reconstructed block set is determined, to obtain a firstprediction mode set.

In operation S503, if the first prediction mode set includes at leasttwo directional modes, each of the directional modes is added into thefirst prediction direction set as a first prediction direction.

In operation S504, any two or more first prediction directions withdifferent directions in the first prediction direction set aredetermined as a prediction group to obtain a prediction group set.

For example, it is assumed that the first prediction directions havingdifferent directions in the first prediction direction set is direction1, direction 2, and direction 3, then the prediction group set obtainedby defining the number of directions in the prediction group as 2includes three prediction groups, that is, (direction 1, direction 2),(direction 1, direction 3), and (direction 2, direction 3).

It will be appreciated that if only the any two or more first predictiondirections with different directions in the first prediction directionset are determined as a prediction group, a number of prediction groupsin the prediction group set can be reduced, and thereby the amount ofcalculation for implementing operation S504 can be reduced.

In operation S505, vector operation is performed, according to thepreset vector operation rule, on two or more first prediction directionsin each prediction group in the prediction group set to obtain thesecond prediction direction set.

Herein, it should be noted that, in fact, operation S504 is oneimplementation example of operation S304 or operation S304 of theabove-described embodiment.

Each first prediction direction in the first prediction direction set isincluded in the second prediction direction set. Taking the obtainedprediction groups (direction 1, direction 2), (direction 1, direction 3)and (direction 2, direction 3) as an example, it is assumed that vectoraddition is performed on two directions in each prediction group, forexample, vector addition are performed on the direction 1 and thedirection 2 to obtain direction 4; vector addition are performed on thedirection 1 and the direction 3 to obtain direction 5; vector additionare performed on the direction 2 and direction 3 to obtain direction 6;this way, the obtained second prediction direction set includes thedirection 1, the direction 2, the direction 3, the direction 4, thedirection 5, and the direction 6.

In operation S506, the second prediction direction set is combined withthe first prediction mode set to obtain a second prediction mode set.

In operation S507, intra prediction is performed on the currentprocessing block based on the second prediction mode set, to obtain atarget prediction direction and a difference between a prediction valueof each sample in the current processing block corresponding to thetarget prediction direction and an original value of the sample.

In operation S508, the target prediction direction and each differenceare signalled in a bitstream of the current processing block.

An embodiment of the present disclosure provides yet another method forintra prediction including operations S601 to S611.

In operation S601, a previously reconstructed block set corresponding toa current processing block is obtained.

In operation S602, a first prediction mode, that is signalled in abitstream, corresponding to each previously reconstructed block in thepreviously reconstructed block set is determined, to obtain a firstprediction mode set.

In operation S603, if the first prediction mode set includes at leasttwo directional modes, each of the directional modes is added into thefirst prediction direction set as a first prediction direction.

In operation S604, any two or more first prediction directions withdifferent directions in the first prediction direction set aredetermined as a prediction group to obtain a prediction group set.

In operation S605, a weighting factor of each first prediction directionin each prediction group is determined, herein the weighting factor isused to represent a degree of correlation between the previouslyreconstructed block corresponding to the first prediction direction andthe current processing block.

In general, a previously reconstructed block closer to the currentprocessing block has a greater degree of correlation with the currentprocessing block, and the corresponding weighting factor is alsogreater.

In operation S606, the first prediction direction corresponding to eachof the weighting factors is preprocessed to enable each of preprocessedfirst prediction directions to have a same length.

For example, each prediction direction has a unit length.

In operation S607, each of the weighting factors is multiplied with acorresponding preprocessed first prediction direction to obtain a thirdprediction direction set.

Herein, it should be noted that, in fact, operations S604 to S607 areone implementation example of operation S505 of the above-describedembodiment.

It wilt be appreciated that multiplying a value (i.e., the weightingfactor) with a vector will only change the length of the vector and willnot change the direction of the vector. For example, as shown in FIG. 4, the preprocessed first prediction direction is OA with a unit length,and if the weighting factor of OA is 2, the third prediction directionobtained by multiplying is OA′.

In operation S608, vector operation is performed on any two or morethird prediction directions in the third prediction direction se toobtain the second prediction direction set.

It will be appreciated, in order to obtain a most probable secondprediction direction as the candidate prediction direction for thecurrent processing block, a greater weighting factor is generallyassigned to the prediction direction corresponding to the previouslyreconstructed block with a stronger correlation with the currentprocessing block, and a smaller weighting factor is assigned to aprediction direction corresponding to the previously reconstructed blockwith a weaker correlation with the current processing block. Forexample, as shown in FIG. 4 , the weighting factor assigned to thedirection OA is 2, and the weighting factor assigned to the direction ABis 1. Correspondingly, the weighting factor 2 is multiplied with thedirection OA to obtain the direction OA′, the weighting factor 1 ismultiplied with the direction AB to obtain the direction AB, and thedirection AB is shifted to the A′ to obtain the direction A′B′. As canbe seen, the length of the direction OA′ is greater than the length ofthe direction A′B′. In this way, when the vector addition is performedon the direction OA′ and the direction A′B′, the resulting direction OB′(i.e., the second prediction direction) is biased towards the directionOA′, so that a more accurate prediction effect can be obtained. Comparedwith directly performing vector operation on OA and AB to obtain thecandidate prediction direction OB of the current processing block, thesecond prediction direction OB′ obtained herein by performing vectoroperation after weight processing is closer to the real situation.

In operation S609, the second prediction direction set is combined withthe first prediction mode set to obtain a second prediction mode set.

In operation S610, intra prediction is performed on the currentprocessing block based on the second prediction mode set, to obtain atarget prediction direction and a difference between a prediction valueof each sample in the current processing block corresponding to thetarget prediction direction and an original value of the sample.

In operation S611, the target prediction direction and the differenceare signalled in a bitstream of the current processing block.

An embodiment of the present disclosure provides another method forintra prediction including operations S701 to S711.

In operation S701, a previously reconstructed block set corresponding toa current processing block is obtained.

In operation S702, a first prediction mode, that is signalled in abitstream, corresponding to each previously reconstructed block in thepreviously reconstructed block set is determined, to obtain a firstprediction mode set.

In operation S703, if the first prediction mode set includes at leasttwo directional modes, each of the directional modes is added into thefirst prediction direction set as a first prediction direction.

In operation S704, any two or more first prediction directions withdifferent directions in the first prediction direction set aredetermined as a prediction group to obtain a prediction group set.

In operation S705, a distance between the previously reconstructed blockcorresponding to each first prediction direction in each predictiongroup and the current processing block is determined.

Herein, it should be noted that, in fact, operations S704 and S705 areone implementation example of operations S605 of the above-describedembodiment.

In operation S706, the weighting factor is assigned, according to apreset weighting factor assignment rule, to a corresponding firstprediction direction based on each of the distances.

In other embodiments, the weighting factor assignment rule may be amapping table of distances and weighting factors, based on which theweighting factor corresponding to each of the distances may bedetermined to allocate a weighting factor to a first predictiondirection corresponding to each of the distances. For example, thesmaller the distance is, the greater the assigned weighting factor is.In this way, when the vector operation is performed, the obtainedprediction direction is made to be biased towards the predictiondirection having a greater weighting factor, so that the possibility ofobtaining a sufficiently accurate prediction effect is increased whenthe intra prediction is performed.

For example, for operation S704, the distance between the previouslyreconstructed block and the current processing block may be determinedaccording to, for example, a number of blocks spaced between thepreviously reconstructed block and the current processing block. Forexample, as shown in FIG. 5A, the current processing block 501 isseparated from the previously reconstructed block 502 by a block 503 anda block 504, then it can be determined that the distance between thepreviously reconstructed block 502 and the current processing block 501is 2. The weighting factor assignment rule for prediction is assumed tobe as shown in Table 1 below.

TABLE 1 distance weighting factor 0 4 1 3 2 2 . . . . . .

Based on Table 1 above, it can be determined that the weighting factorof the first prediction direction corresponding to the previouslyreconstructed block 502 is 2.

As another example, for operation S704, the distance between thepreviously reconstructed block and the current processing block may alsobe determined according to a number of samples spaced between thepreviously reconstructed block and the current processing block. Forexample, as shown in FIG. 5B, with the sample A of the currentprocessing block 503 as a reference sample, a total number M of pixelsfrom the sample A of the current processing block 503 to the sample B ofthe previously reconstructed block 504 is determined, and M isdetermined as the distance between the previously reconstructed block504 and the current processing block 503. It should be noted that thesetting rule for the reference sample of each current processing blockis consistent, for example, the center point of the current processingblock may be used as a reference sample. The weighting factor assignmentrule for prediction is assumed to be as shown in Table 2 below:

TABLE 2 distance range weighting factor  [50, 100) 4 (100, 150] 3 [150,300) 2 . . . . . .

Based on Table 2 above, the distance range to which M belongs can bedetermined to obtain a corresponding weighting factor.

In operation S707, the first prediction direction corresponding to eachof the weighting factors is preprocessed to enable each of preprocessedfirst prediction directions to have a same length.

In operation S708, each of the weighting factors is multiplied with acorresponding preprocessed first prediction direction to obtain a thirdprediction direction set.

In operation S709, vector operation is performed on any two or morethird prediction directions in the third prediction direction set toobtain the second prediction direction set.

In other embodiments, for operation S709, vector addition or vectorsubtraction may be performed on any two or more of the third predictiondirections in the third prediction direction set to obtain the secondprediction direction set.

In operation S710, the second prediction direction set is combined withthe first prediction mode set to obtain a second prediction mode set.

In operation S711, intra prediction is performed on the currentprocessing block based on the second prediction mode set.

An embodiment of the present disclosure provides yet another method forintra prediction including operations S801 to S809.

In operation S801, a neighbouring previously reconstructed block setcorresponding to a current processing block is obtained.

In operation S802, a first prediction mode, that is signalled in abitstream, corresponding to each neighbouring previously reconstructedblock in the neighbouring previously reconstructed block set isdetermined, to obtain a first prediction mode set.

In operation S804, if the first prediction mode set includes at leasttwo directional modes, each of the directional modes is added into thefirst prediction direction set as a first prediction direction.

In operation S805, any two or more first prediction directions withdifferent directions in the first prediction direction set aredetermined as a prediction group to obtain a prediction group set.

In operation S806, vector addition is performed an two first predictiondirections in each prediction group to obtain a second predictiondirection set.

In operation S807, the second prediction direction set is combined withthe first prediction mode set to obtain a second prediction mode set.

In operation S808, intra prediction is performed on the currentprocessing block based on the second prediction mode set, to obtain atarget prediction direction and a difference between a prediction valueof each sample in the current processing block corresponding to thetarget prediction direction and an original value of the sample.

In operation S809, the target prediction direction and the differenceare signalled in a bitstream of the current processing block.

Currently, there are three methods for constructing an intra predictiondirection.

The first method is a construction method of luma intra predictiondirections in the VVC draft, and related description is an follows.

In the early Joint Exploration Model (JEM), the most probable mode listincluding 6 most probable modes, that is, the MPM list, was used in theluma prediction direction coding. As shown in FIG. 3B, the intraprediction directions (also referred to as intra prediction directions)of the five neighbouring blocks of the current processing block 601 aretaken into account in the derivation process of the MPM list, where fiveneighbouring blocks are the left (L) block, the above (A) block, thebelow left (BL) block, the above right (AR) block, and the above left(AL) block.

The candidate prediction directions of the MPM list are divided intothree groups: a neighbouring prediction direction, a derived predictiondirection, and a default prediction direction. First, neighbouringprediction directions are added into the MPM list. Each intra predictiondirection in the MPM list can be added only once, that is, the MPM listcannot contain duplicated prediction directions. If the number of theprediction directions included in the MPM list is less than 6 after theneighbouring prediction directions are added, the derived intraprediction directions are added into the MPM list. Furthermore, if thenumber of the prediction direction included in the MPM list after theaddition of the derived prediction direction is completed is still lessthan 6, the default prediction direction is added into the MPM listuntil the MPM list containing 6 most probable prediction directions isderived.

When entropy coding is performed on the intra prediction direction ofeach luma block, the MPM list of the luma block is first obtained, andit is determined whether the intra prediction direction selected for theluma block is in the MPM list. If the intra prediction directionselected for the luma block is in the MPM list, an index number of theprediction direction in the MPM is binarized by using the truncatedbinary code; the smaller the index number is, the smaller the generatedtruncated binary code, and then the truncated binary code is encoded byusing an arithmetic encoder, so that bit overhead can be saved. If theintra prediction direction selected for the luma block is one of theremaining 61 prediction directions that are not in the MPM list, the 61prediction directions are re-numbered from 0, and 16 predictiondirections whose numbers are divisible by 4 are selected as the selectedmodes. If the intra prediction direction is in the selected mode, bypasscoding is performed by using a fixed 4-bit length. If the intraprediction direction is in the remaining 45 non-selected modes, the 45non-selected modes are re-numbered again from 0, their numbers arebinarized using the truncated binary code, and a bit string of 5 or 6bits in length is generated according to sizes of the numbers, thenbypass coding is performed.

Since the 6MPM list in JEM is complex, a scheme using a simplified 3MPMlist was then proposed. However, the 3MPM list includes less predictiondirections, and the prediction effect obtained is not accurate enough.Later, a simplified 6MPM list (which is also a method used in thecurrent VVC draft) was proposed. For example, a new candidate predictiondirection of the current processing block 601 is constructed based on atarget prediction direction corresponding to the above (A) block and atarget prediction direction corresponding to the left (L) block in FIG.6 , and the derivation process thereof is as follows.

dirL==dirA • dir<2  MPM0=dir (Planar or DC)  MPM1=Planar/DC  MPM2=50(vertical)  MPM3=18 (horizontal)  MPM4=50−4  MPM5=50+4 • dir>=2 MPM0=dir  MPM1=Planar  MPM2=DC  MPM3=dir−1  MPM4=dir+1  MPM5=dir−2dirL!=dirA • all are angles  MPM0=dirL  MPM1=dirA  MPM2=Planar  MPM3=DC MPM4= greater angle − 1  MPM5= greater angle + 1 • one is angle MPM0=dirL  MPM1=dirA  MPM2=Planar/DC  MPM3= angle − 1  MPM4= angle + 1 MPM5= angle − 2

The second method is a construction method of chroma intra predictiondirection in the VVC draft, and is described as follows, as shown inTable 3.

TABLE 3 Serial number Name Description 1 Derived See the prediction modecorresponding to the luma Mode center block CR in FIG. 7 (DM) 2 CCLM Aprediction signal is constructed by using a scheme CCLM_L of a*lumavalue + b CCLM_T CCLM: a and b are calculated according to the previousrow and the left column CCLM_L: a and b are calculated by using the leftcolumn CCLM_T: a and b are calculated by using the previous row 3 DCPrediction direction, index number 1 in FIG. 1B, if the DM is the DCmode, changed to 66 4 PLANAR Prediction direction index number 0 in FIG.1B, if the DM is the planar mode, changed to 66 5 VER Predictiondirection index number 50 in FIG. 1B, if the DM is the VER mode, changedto 66 6 HOR Prediction direction index number 18 in FIG. 1B, if the DMis the HOR mode, changed to 66

FIG. 7 is a schematic diagram illustrating arrangement of luma blocksand chroma corresponding to the current processing block according to anembodiment of the present disclosure. As shown in FIG. 7 , the gray areain the left half of the right square is a current processing chromablock 71, and the gray area in the left half of the left square is aluma area corresponding to the current processing chroma block 71. Whenintra prediction of the current chroma block 71 is performed, aprediction mode recorded by means of the center position of the lumaarea is the prediction mode of the CR luma block 701 in the left squareof FIG. 7

With reference to the contents shown in Table 3 and FIG. 7 , it can bedetermined that if the prediction direction obtained by the DM is thesame as one of the last four prediction directions, the same mode inrows 3 to 6 is replaced with a prediction direction with an index numberof 66.

The third method is Multiple Direct Modes (MDMS) for chroma intracoding, and the relevant description of the method is as follows.

MDMS is a more complex method for constructing chroma intra predictiondirections. As shown in Table 4, there is a bit rate saving of 0.2%compared with the first scheme, but because the complexity is too high,it has not been applied to VVC.

TABLE4 Serial number Name Narration 1 CCLM A prediction signal isconstructed by using a scheme of a*luma value + b Pick out 5 DM Intraprediction directions of luma blocks prediction corresponding to fivepositions including directions CR, TL, TR, BL and BR of current chromain order block, i.e., blocks 801 to 805 in FIG. 8(a) Chroma Intraprediction directions of L block, AL neighbouring block, BL block, Ablock and AR block block spatially neighbouring to a chroma block, i.e.,blocks 806 to 810 in FIG. 8(b) DC Prediction direction index number 1 inFIG. 1B PLANAR Prediction direction index number 0 in FIG. 1B Trimmingof Prediction direction derived from the existing existing predictiondirection incremented or prediction decremented by 1 direction Defaultmode: VER (18), HOR (50), 2, 34, 66, 10, 26

FIG. 8 is a schematic diagram illustrating arrangement of chroma blocksused in the DM mode and the chroma neighbouring block mode,respectively, in Table 4. As shown in blocks 801 to 805 in FIG. 8(a),the DM modes in Table 4 are intra prediction modes of luma blockscorresponding to five positions including CR, TL, TR, BL and BR ofcurrent chroma block. As shown in blocks 806 to 810 in FIG. 8(b), thechroma neighbouring block modes in Table 4 are intra predictiondirections of L block, AL block, BL block, A block and AR blockspatially neighbouring to a chroma block, that is, the signalledprediction directions.

FIG. 9 is a schematic diagram of the traversal sequence of the intraprediction directions of MDMS. As shown in FIG. 9 , the traversal issequentially performed according to numbers 1 to 17 as follows: 1.central luma block C; 2. top left luma block TL; 3. top right luma blockTR; 4. below left luma block BL; 5. below right luma block BR; 6 leftchroma block L; 7. above chroma block A; 8. below left chroma block BL;9. above right chroma block AR; 10. above left chroma block AL; 11.PLANAR; 12. DC; 13. existing prediction direction index numbersincremented or decremented by 1; 14. VER; 15. HOR; 16. a predictiondirection index number 2; and 17. a prediction direction index number34.

It should be noted that the DC mode, the planar mode, the VER (18) mode,and the HOR (50) mode in Table 4 above are forced filling modes, andthey will replace candidate modes at the end of the list if thecandidate list is full.

As can be seen from the above three conventional construction methods ofthe prediction directions, the construction method of luma intraprediction directions in VVC is simple, and when increment or decrementis performed on the basis of an existing prediction direction in theMPM, an operation of incrementing or decrementing an index number of theexisting prediction direction by 1 and incrementing or decrementing theindex number by 2 is used to obtain the neighbouring predictiondirection. The gain of the MDMS is relatively obvious, and whenincrement or decrement is performed on the basis of the existingprediction direction in the MPM, the operation of incrementing ordecrementing an index number of the existing prediction direction by 1is also used to obtain the neighbouring prediction direction.

However, the method of constructing a new prediction direction byincrementing or decrementing the index number of the existing predictiondirection by 1 or 2 does not sufficiently take into account thecharacteristics of the local contents of the current processing block,and does not fully utilize the direction information at the periphery ofthe current processing block, so that the prediction effect is still notsufficiently accurate in the prediction process.

Based on the above, in the embodiments of the present disclosure, ifthere multiple directions indicated in direction in around the currentprocessing block, a new prediction direction can be constructed using anaverage value of the directions.

For example, when luma and/or chroma intra prediction is performed onthe current processing block, if multiple prediction directions (thatis, the first prediction directions) are used as reference, a newaverage prediction direction (that is, the second prediction direction)may be constructed as alternative information. As shown in FIG. 10 , theprediction direction d_(A) of a block A is obtained in FIG. 10(a), theprediction direction d_(B) of a block B is obtained, new predictiondirections I₁ and I₂ are generated along a midline of an included anglebetween the prediction directions d_(A) and d_(B), and a predictiondirection conforming to the current processing block is selected as analternative. Then, an original alternative obtained by incrementing ordecrementing the direction index number by 1 is replaced.

In a specific implementation example where the luma MPM list isconstructed, for example, when the prediction directions d_(A) of theblock A and the prediction directions d_(B) of the block B are notequal, a reference prediction direction (i.e., the second predictiondirection) constructed by vector addition or vector subtractionperformed on the d_(A) and the d_(B) is used to replace the original“greater angle+1” and “greater angle−1”, or is added in front of thederived mode of “angle +/−1” as an alternative mode.

It should be noted that, based on the VVC TEST MODEL (VTM) 3.0, comparedwith original technical solutions, the technical solutions of thepresent disclosure can save the coding bit rate on the premise of a samevideo recovery quality, specifically, a decrease of 0.01% in the bitrate.

In other embodiments, for an implementation of determining a list ofcandidate chroma prediction directions (i.e., the second predictiondirection set), for example, in MDMS and similar solutions, theresulting DMs are angular modes and have mutually different directions(e.g., the index numbers of the two directions are different);alternatively, when the obtained intra prediction directions of theneighbouring block of the current chroma block are angular modes andhave different values from each other, for example, there are twodifferent directions d_(A) and d_(B), then a reference predictiondirection (i.e., the second prediction direction) constructed by vectoraddition or vector subtraction performed on the d_(A) and the d_(B) isused to replace the original “existing angular mode +/−1”, or is addedin front of the derived mode of “existing angular mode +/−1” as analternative mode.

In other embodiments, only one average angular direction (i.e., thesecond prediction direction) may be used to be added into the candidatelist (i.e., the second prediction direction set), such as only thedirection obtained by vector addition of directions d_(A) and d_(B),i.e., I₁ in FIG. 10(b) is added; or, only the direction obtained byvector subtraction of directions d_(A) and d_(B), i.e., I₂ in FIG. 10(b)is added; and when the luma MPM is constructed, the only one averageangular direction is used to replace the original “greater angle+1” or“greater angle−1”, or I₁ or I₂ is put in front of the alternative of the“angle +/−1”.

In other embodiments, only one average angular direction may be used tobe added into the candidate list, such as only the direction obtained byvector addition of directions d_(A) and d_(B), i.e., I₁ an FIG. 10(b) isadded; and when the chroma prediction mode list is constructed, the onlyone average angular direction is used to replace the original “existingangular mode +/−1”, or is added in front of the derived mode of“existing angular mode +/−1” as an alternative mode.

In other embodiments, since a technique such as MDMS may generate aplurality of different angles when a list of chroma prediction modes isconstructed, a plurality of average angle directions may be used to beadded into the candidate list, for example, if there are three differentangle directions d_(A), d_(B) and d_(C), all or a part of a newprediction direction set (i.e., the second prediction direction set)obtained by vector addition or vector subtraction of any two of thethree directions d_(A), d_(B) and d_(C) may be considered to be added ascandidate(s), so as to replace an original “existing angular mode +/−1”,or so as to be placed in front of the alternative of “angle +/−1”, whenthe list of chroma prediction modes is constructed.

Based on the foregoing embodiments, an embodiment of the presentdisclosure provides a device for intra prediction including modulesincluded therein and units included in the modules, which may beimplemented by a processor in a video coding apparatus; it is alsopossible to implement the device by specific logic circuits; in theimplementation, the processor may be a central processing unit (CPU), amicroprocessor (MPU), a digital signal processor (DSP), or a fieldprogrammable gate array (FPGA), etc.

FIG. 11A is a schematic structural diagram of a device for intraprediction according to an embodiment of the present disclosure. Asshown in FIG. 11A, the device 11 includes:

-   -   an obtaining module 111, configured to obtain a previously        reconstructed block set corresponding to a current processing        block;    -   a determining module 112, configured to determine a first        prediction mode, that is signalled in a bitstream, corresponding        to each previously reconstructed block in the previously        reconstructed block set, to obtain a first prediction mode set;        if the first prediction mode set includes at least two        directional modes, add each of the directional modes into the        first prediction direction set as a first prediction direction;    -   a vector operation module 113, configured to perform, according        to a preset vector operation rule, vector operation on any two        or more fast prediction directions in the first prediction        direction set to obtain a second prediction direction set;    -   an intra prediction module 114, configured to combine the second        prediction direction set with the first prediction mode set to        obtain a second prediction mode set, and perform intra        prediction on the prediction direction of the current processing        block based on the second prediction mode set.

In other embodiments, the intra prediction module 114 is configured toperform intra prediction on the current processing block to obtain atarget prediction direction and a difference between a prediction valueof each sample in the current processing block corresponding to thetarget prediction direction and an original value of the sample.

In other embodiments, as shown in FIG. 11B, the device 11 furtherincludes a signalling module 115; the signalling module 115 isconfigured to signal the target prediction direction and the differencein a bitstream of the current processing block.

In other embodiments, the vector operation module 113 includes:

-   -   a determining unit, configured to determine any two or more        first prediction directions with different directions in the        first prediction direction set as a prediction group to obtain a        prediction group set;    -   a vector operation unit, configured to perform, according to the        preset vector operation rule, vector operation on two or more        first prediction directions in each prediction group in the        prediction group set to obtain the second prediction direction        set.

In other embodiments, the vector operation unit includes:

-   -   a determining subunit, configured to determine a weighting        factor of each first prediction direction in each prediction        group, wherein the weighting factor is used to represent a        degree of correlation between the previously reconstructed block        corresponding to the first prediction direction and the current        processing block;    -   a preprocessing subunit, configured to preprocess the first        prediction direction corresponding to each of the weighting        factors to enable each of preprocessed first prediction        directions to have a same length;    -   a calculation subunit, configured to multiply each of the        weighting factors with a corresponding preprocessed first        prediction direction to obtain a third prediction direction set;    -   a vector operation subunit, configured to perform vector        operation on any two or more third prediction directions in the        third prediction direction set to obtain the second prediction        direction set.

In other embodiments, the determining subunit is configured to:

-   -   determine a distance between the previously reconstructed block        corresponding to each first prediction direction in each        prediction group and the current processing block;    -   assign, according to a preset weighting factor assignment rule,        the weighting factor to a corresponding first prediction        direction based on each of the distances.

In other embodiments, the vector operation subunit is configured to:

-   -   perform vector addition or vector subtraction on any two or more        third prediction directions in the third prediction direction        set to obtain the second prediction direction set.

In other embodiments, the first prediction direction includes at leastone of a luma intra prediction direction or a chroma intra predictiondirection.

The description of the above device embodiment is similar to that of theabove method embodiment, and has a beneficial effect similar to that ofthe method embodiment. For technical details not disclosed in the deviceembodiments of the present application, reference is made to thedescription of the method embodiments of the present application.

It should be noted, if the function of the method for intra predictionis realized in the form of a software function unit and sold or used asan independent product, it can be stored in a computer readable storagemedium. Based on such understanding, the technical solution of thepresent disclosure, in essence or in part contributing to the relatedart, may be embodied in the form of a software product, which is storedin a storage medium, includes several instructions for making a computerdevice (which can be a personal computer, a server, a network device,etc.) to perform all or part of the method according to each embodimentof the present disclosure. The aforementioned storage media include: Udisk, mobile hard disk, read-only memory (ROM), random access memory(RAM), disk or optical disk and other media that can store program code.Thus, the embodiments of the present disclosure are not limited to anyparticular combination of hardware and software.

Accordingly, an embodiment of the present disclosure provides a videocoding apparatus, and FIG. 12 is a schematic diagram of a hardwareentity of the video coding apparatus according to an embodiment of thepresent disclosure. As shown in FIG. 12 , the video coding apparatus 120includes a memory 1201 that stores a computer program that can run onthe processor 1202, and a processor 1202 that implements the operationsin the intra prediction method provided in the foregoing embodiment whenthe processor 1202 executes the program.

It should be noted that the memory 1201 is configured to storeinstructions and applications executable by the processor 1202, and mayalso cache data (e.g., picture data, audio data, voice communicationdata, and video communication data) to be processed or already processedby various modules in the to-be-processed processor 1202 and the videocoding apparatus 120, which may be implemented by a flash memory (FLASH)or a Random Access Memory (RAM).

Accordingly, an embodiment of the present disclosure provides acomputer-readable storage medium having stored thereon computer programswhich, when executed by a processor, implements the operations in themethod for intra prediction provided in the above-described embodiments.

It should be noted that the above description of the storage medium andapparatus embodiments is similar to the above description of the methodembodiments and has the advantages similar to the method embodiments.For technical details not disclosed in the storage medium and deviceembodiments of the present disclosure, reference is made to thedescription of the method embodiments of the present disclosure.

It should be understood that reference throughout the specification to“one embodiment” or “an embodiment” means that a particular feature,structure, or characteristic associated with the embodiment is includedin at least one embodiment of the present disclosure. Thus, theappearances of & “in one embodiment” or “in an embodiment” in variousplaces throughout the specification do not necessarily refer to the sameembodiment. Furthermore, these specific features, structures, orcharacteristics may be combined in any suitable manner in one or moreembodiments. It is to be understood that, in the various embodiments ofthe present disclosure, the magnitude of the sequence numbers of theprocesses described above is not meant to mean the order of execution,and the order of execution of the processes should be determined bytheir function and intrinsic logic, and should not be construed as anylimitation on the implementation of the embodiments of the presentdisclosure. The above-described embodiment numbers of the presentdisclosure are for description only and do not represent the advantagesor disadvantages of the embodiments.

It is to be noted that, in this disclosure, the terms “includes”,“including” or any other variation thereof, are intended to cover anon-exclusive inclusion, such that a process, method, article, or devicethat includes a list of elements includes not only those elements butalso other elements not expressly listed, or also includes elementsinherent to such process, method, article, or device. Without morelimitations, an element is defined by the statement “including a . . . ”that does not rule out there are additional identical elements in aprocess, method, article, or apparatus that includes the element.

In several embodiments provided by the present disclosure, it should beunderstood that the disclosed devices and methods can be realized inother ways. For example, the embodiment of the device described above isonly schematic. For example, the division of the unit is only a logicalfunction division, and there can be another division method in actualimplementation, for example, multiple units or components can becombined or integrated into another system, or some features can beignored or not implemented. On the other hand, the mutual coupling ordirect coupling or communication connection illustrated or discussed canbe indirect coupling or communication connection through someinterfaces, devices or units, and can be electric, mechanical or otherforms.

The unit described as a separation part may or may not be physicallyseparated, and the unit displayed as a unit may or may not be a physicalunit, that is, may be located in one place, or it may be distributed tomultiple network units. Some or all of the units can be selectedaccording to the actual needs to achieve the purpose of the embodiment.

In addition, each functional unit in each embodiment of the presentdisclosure may be integrated in one processing unit, each unit may existphysically alone, or two or more units may be integrated in one unit;the integrated unit may be implemented in the form of hardware or in theform of the combination of the hardware and software functional units.

It will be appreciated by those of ordinary skill in the an that all ora portion of the operations of the above-described method embodimentsmay be implemented by means of hardware associated with programinstructions. The above-described program may be stored in acomputer-readable storage medium. The program, when executed, performsthe operations of the above-described method embodiments. The storagemedium includes a removable storage device, a Read Only Memory (ROM), amagnetic disk, or an optical disk and other media that can store programcodes.

Alternatively, the integrated unit described above may be stored in acomputer-readable storage medium if implemented as a software functionalmodule and sold or used as an independent product. Based on such anunderstanding, the technical solution of the embodiments of the presentdisclosure, in essence or in part contributing to the related art, maybe embodied in the form of a software product, which is stored in astorage medium, includes instructions for causing a video codingapparatus to perform all or part of the methods described in the variousembodiments of the present disclosure. The aforementioned storage mediainclude: U disk, mobile hard disk, read-only memory (ROM), random accessmemory (RAM), disk or optical disk and other media that can storeprogram code.

The above is only the specific embodiments of the disclosure, but thescope of protection of the disclosure is not limited to this. Any personskilled in the technical field who can easily think of change orreplacement within the technical scope of the disclosure shall becovered in the scope of protection of the disclosure. Therefore, theprotection scope of the disclosure shall be subject to the protectionscope of the claims.

INDUSTRIAL APPLICABILITY

In an embodiment of the present application, an method for intraprediction is provided, a previously reconstructed block setcorresponding to a current processing block is obtained a firstprediction direction, that is signalled in a bitstream, corresponding toeach previously reconstructed block in the previously reconstructedblock set is determined (i.e., a known candidate prediction direction ofthe current processing block, to obtain a first prediction mode set: ifthe first prediction mode set includes at least two directional modes,each of the directional modes is added into the first predictiondirection set as a first prediction direction; vector operation isperformed, according to a preset vector operation rule, on any two ormore first prediction directions in the first prediction direction setto obtain a second prediction direction set (it can be understood thatthe second prediction direction in the second prediction direction setis a new candidate prediction direction of the current processingblock); the second prediction direction set is combined with the firstprediction mode set to obtain a second prediction mode set, intraprediction is performed on the current processing block based on thesecond prediction mode set.

In this way, a new candidate prediction direction is constructed byperforming a vector operation on two or more known candidate predictiondirections, that is, the second prediction direction set is combinedwith the first prediction mode set to obtain the second prediction modeset, and intra prediction is performed on the current processing blockbased on the second prediction mode set, so that the possibility ofobtaining a sufficiently accurate prediction effect can be increased.

The invention claimed is:
 1. A method for intra prediction, applied toan encoder, the method comprising: obtaining multiple previouslyreconstructed neighbouring blocks corresponding to a current processingblock; determining prediction modes, that are signalled in a bitstream,corresponding to neighbouring blocks of the multiple previouslyreconstructed neighbouring blocks, to obtain multiple first predictionmodes; if the multiple first prediction modes comprise at least twodirectional modes, taking directional modes comprised in the multiplefirst prediction modes as first prediction directions; performingoperation on one or more of: multiple first prediction directions withdifferent directions among the multiple first predication directions, amaximum of the multiple first prediction directions with differentdirections, or a minimum of the multiple first prediction directionswith different directions, and determining second prediction directionsaccording to a result of the operation and a preset offset; obtaining aprediction mode set according to the second prediction directions andthe multiple first prediction modes; and performing intra prediction onthe current processing block based on the prediction mode set.
 2. Themethod of claim 1, wherein performing intra prediction on the currentprocessing block based on the prediction mode set comprises: obtaining athird prediction direction based on the prediction mode set, andperforming intra prediction on the current processing block according tothe third prediction direction to obtain a prediction value of a samplein the current processing block corresponding to the third predictiondirection; determining a residual value between the prediction value ofthe sample in the current processing block and an original value of thesample; and signalling the third prediction direction and the residualvalue in a bitstream of the current processing block.
 3. The method ofclaim 1, wherein the preset offset is at least one of +1, −1, +2 or −2.4. The method of claim 1, wherein the first prediction directionscomprise a luma intra prediction direction.
 5. The method of claim 1,wherein the neighbouring blocks are a left neighbouring block and anabove neighbouring block of the current processing block.
 6. A methodfor intra prediction, applied to a decoder, the method comprising:obtaining multiple previously reconstructed neighbouring blockscorresponding to a current processing block; obtaining multiple firstprediction modes according to prediction modes of neighbouring blocks ofthe multiple previously reconstructed neighbouring blocks; if themultiple first prediction modes comprise at least two directional modes,taking directional modes comprised in the multiple first predictionmodes as first prediction directions; performing operation on one ormore of: multiple first prediction directions with different directionsamong the multiple first predication directions, a maximum of themultiple first prediction directions with different directions, or aminimum of the multiple first prediction directions with differentdirections, and determining second prediction directions according to aresult of the operation and a preset offset; obtaining a prediction modeset according to the second prediction directions and the multiple firstprediction modes; and performing intra prediction on the currentprocessing block based on the prediction mode set.
 7. The method ofclaim 6, wherein performing intra prediction on the current processingblock based on the prediction mode set: determining a prediction valueof a sample in the current processing block; and obtaining areconstruction value of the sample according to the predication valueand a residual value of the sample in the current processing block, theresidual value being parsed from a bitstream.
 8. The method of claim 6,wherein the preset offset is at least one of +1, −1, +2 or −2.
 9. Themethod of claim 6, wherein the first prediction directions comprise aluma intra prediction direction.
 10. The method of claim 6, wherein theneighbouring blocks are a left neighbouring block and an aboveneighbouring block of the current processing block.
 11. A decodercomprising a memory and a processor, the memory storing instructionsexecutable on the processor, wherein the processor, when executing theinstructions, perform operations of: obtaining multiple previouslyreconstructed neighbouring blocks corresponding to a current processingblock; obtaining multiple first prediction modes according to predictionmodes of neighbouring blocks of the multiple previously reconstructedneighbouring blocks; if the multiple first prediction modes comprise atleast two directional modes, taking directional modes comprised in themultiple first prediction modes as first prediction directions;performing operation on one or more of: multiple first predictiondirections with different directions among the multiple firstpredication directions, a maximum of the multiple first predictiondirections with different directions, or a minimum of the multiple firstprediction directions with different directions, and determining secondprediction directions according to a result of the operation and apreset offset; obtaining a prediction mode set according to the secondprediction directions and the multiple first prediction modes; andperforming intra prediction on the current processing block based on theprediction mode set.
 12. The decoder of claim 11, wherein performingintra prediction on the current processing block based on the predictionmode set: determining a prediction value of a sample in the currentprocessing block; and obtaining a reconstruction value of the sampleaccording to the predication value and a residual value of the sample inthe current processing block, the residual value being parsed from abitstream.
 13. The decoder of claim 11, wherein the preset offset is atleast one of +1, −1, +2 or −2.
 14. The decoder of claim 11, wherein thefirst prediction directions comprise a luma intra prediction direction.15. The decoder of claim 11, wherein the neighbouring blocks are a leftneighbouring block and an above neighbouring block of the currentprocessing block.